import 'package:flutter/material.dart';

void main() =>runApp(MyApp(
    items:new List<String>.generate(10, (i)=>"item+$i")


));

class MyApp extends StatelessWidget {

  final List<String> items;

  MyApp({Key key, @required this.items}) :super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: "动态列表",
        home: Scaffold(
          appBar: AppBar(
            title: Text("动态列表"),
          ),
          body: ListView.builder(
              itemCount: 100,
              itemBuilder: (context, index) {
                return ListTile(
                  title: Text( '${items[index]}'),
                );
              }
          ),
        )
    );
  }

}